package com.lambda.hybrid;

import com.tencent.smtt.sdk.WebChromeClient;
import com.tencent.smtt.sdk.WebView;

/**
 * TAG: chromium
 */
public class HybridChromeClient extends WebChromeClient {
    private final HybridView bridgeWebView;

    public HybridChromeClient(HybridView webView) {
        bridgeWebView = webView;
    }

    @Override
    public void onProgressChanged(WebView webView, int i) {
        if (bridgeWebView.hybridConfig.isProgressEnable() && !bridgeWebView.progressFinish) {
            bridgeWebView.setProgress(i / 100.f);
        }
    }
}
